<!DOCTYPE html>
<html lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta name="language" content="ru" />

	<title><?php echo CHtml::encode($this->getTitle()); ?></title>
	<meta name="description" content="<?php echo CHtml::encode($this->getDescription()); ?>"/>
	<meta name="keywords" content="<?php echo CHtml::encode($this->getKeywords()); ?>"/>

	<?php $aMetaOg = $this->getMetaOg(); if(!empty($aMetaOg)): ?>
	<meta property="og:type" content="<?php echo $aMetaOg['type']; ?>" />
	<meta property="og:title" content="<?php echo $aMetaOg['title']; ?>" />
	<meta property="og:url" content="<?php echo $aMetaOg['url']; ?>" />
	<meta property="og:image" content="<?php echo $aMetaOg['image']; ?>" />
	<meta property="og:description" content="<?php echo $aMetaOg['description']; ?>" />
	<meta property="og:site_name" content="<?php echo $aMetaOg['site_name']; ?>" />
	<?php endif; ?>

	<link async rel="stylesheet" type="text/css" href="/css/style.css" />
	<link async rel="stylesheet" type="text/css" href="/js/jquery/fancybox/jquery.fancybox.css" />

	<script defer src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
</head>

<body>
<div id="lt-wrapper">
	<div id="header">
		<div class="wrapper">
			<div id="logo"><a title="<?php echo _('Главная'); ?> <?php echo CHtml::encode(Yii::app()->name); ?>" href="<?php echo $this->createUrl('/site/index'); ?>"><?php echo CHtml::encode(Yii::app()->name); ?></a></div>
			<div id="search">
				<form action="<?php echo Yii::app()->controller->createUrl('/search/search', array())?>" method="get">
					<input type="text" name="q" required="" value="<?php echo !empty($this->q) ? $this->q : ''; ?>" autocomplete="off" />
					<button type="submit"><span>Искать</span></button>
				</form>
			</div>

			<div id="cart"<?php echo Order::model()->getCountInCart() > 0 ? ' class="exists"' : ''; ?>>
				<a class="cart" title="<?php echo _('В корзину'); ?>" href="<?php echo $this->createUrl('/cart'); ?>"></a>
				<a class="text" href="<?php echo $this->createUrl('/cart'); ?>"><span>В корзине</span><span><?php echo (Order::model()->getCountInCart() ? Order::model()->getCountInCart() : '') .' '. String::declination(Order::model()->getCountInCart(), array('товар', 'товара', 'товаров', 'нет товаров')); ?></span></a>
			</div>

			<div id="phones">
				<p>(099) 31-61-201</p>
			</div>

			<div class="clear"></div>
		</div>
	</div>

	<?php //if($this->beginCache('top_menu', array('duration' => 3600))) { ?>
	<div id="top-menu">
		<div class="wrapper">
			<?php echo $this->widget('ext.menu.TopMenuWidget',array(
			                                                       'selectIds'=>$this->selectCategories,
			                                                  )); ?>
			<div class="clear"></div>
		</div>
	</div>
	<?php //$this->endCache(); } ?>

	<div id="lt">
		<?php if(isset($this->breadcrumbs)):?>
			<?php //if($this->beginCache('bredcrumbs_'.$this->cacheId, array('duration' => 3600))) { ?>
				<?php $this->widget('ext.MyBreadcrumbs', array(
							'links'=>$this->breadcrumbs,
							'filters'=>(!empty($this->aFilters) ? $this->aFilters : array()),
							'separator' => ' &nbsp;>&nbsp; '
						)); ?>
			<?php //$this->endCache(); } ?>
		<?php endif; ?>